//
// TestSetup.h
//

#ifndef CppUnit_TestSetup_INCLUDED
#define CppUnit_TestSetup_INCLUDED


#include "Guards.h"
#include "TestDecorator.h"

namespace JHCPP{
	namespace CppUnit{
		class CTest;
		class CTestResult;

		class CTestSetup: public CTestDecorator
		{
			REFERENCEOBJECT (CTestSetup)

		public:
			CTestSetup(CTest* test): CTestDecorator(test) 
			{
			}
			
			void run(CTestResult* result);

		protected:
			void setUp() 
			{
			}
			
			void tearDown()
			{
			}
		};


		inline void CTestSetup::run(CTestResult* result)
		{
			setUp();
			CTestDecorator::run(result); 
			tearDown();
		}

	}//end of namespace CppUnit
}//end of namespace JHCPP

#endif // CppUnit_TestSetup_INCLUDED
